package com.moon.tools;

import cn.smallbun.screw.core.util.StringUtils;
import com.moon.tools.entity.GenInfoEntity;
import com.moon.tools.util.AutoGeneDatabaseDocument;

/**
 * @ClassName: test
 * @Description: TODD
 * @Author: 郭正洋
 * @Date: 2022/10/11 11:07
 * @Vsersion: 1.0.0
 **/
public class test {

    public static void main(String[] args) {
        genPGsql();
    }


    public void genMysql(){
        GenInfoEntity mysql = new GenInfoEntity();
        mysql.setDriver("com.mysql.cj.jdbc.Driver");
        mysql.setUrl("jdbc:mysql://172.88.0.20:3306/ht_green_mine_test?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false");
        mysql.setUserName("fossil");
        mysql.setPassword("123456");
        mysql.setOutputPath("d://mysql");
        mysql.setVersion("v1.0.5");
        mysql.setOrganization("郭正洋");
        mysql.setDescription("绿色矿山数据库文档");
        AutoGeneDatabaseDocument.genMysqlDocument(mysql);
    }

    public static void genPGsql(){
        GenInfoEntity mysql = new GenInfoEntity();
        mysql.setDriver("org.postgresql.Driver");
        mysql.setUrl("jdbc:postgresql://172.88.0.11:31180/gis?stringtype=unspecified");
        mysql.setUserName("postgres");
        mysql.setPassword("pg@123");
        mysql.setOutputPath("d://mysql");
        mysql.setVersion("v1.0.5");
        mysql.setOrganization("郭正洋");
        mysql.setDescription("云南省矿业权一张图数据库文档");
        AutoGeneDatabaseDocument.genMysqlDocument(mysql);
    }
}
